package tw.org.iii.activitysample;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;

public class ActList extends ListActivity {

	String[] strUsers=null;
	protected void onListItemClick(ListView l, View v, int position, long id) {		
		super.onListItemClick(l, v, position, id);
		Bundle bund =new Bundle();
		bund.putString("KK", strUsers[position]);
		
		Intent intent=new Intent();
		intent.putExtras(bund);
		setResult(0,intent);
		finish();
		
		
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		strUsers=new String[]{"Marco","Tom","Jason","Selina","Mark","July",
				"Mary","Bill","Jacky","Wang","Matt",
				"Marian","Bily","Jack","Wan","Mati",
				"Joey","Bruce","MainChu","WudwenYee","Sun"};
		
		ListAdapter l_listAdapter=new ArrayAdapter<String>(
				this,
				android.R.layout.simple_list_item_1,
				strUsers);
		
		setListAdapter(l_listAdapter);



	}

}
